package com.lagou.module2.task2;

public class PhoneTest {
    public static void main(String[] args) {
        //调用对象
        PhoneCard pc = new PhoneCard("联通",186333, "张子扬", "12345", 99.9, 20, 10);
        pc.showCard();
        System.out.println("-------------------------");
        //调用枚举打印信息
        PhoneCardType[] pct = PhoneCardType.values();
        for (int i=0; i< pct.length; i++){
            pct[i].callService(60, pc);
        }
        System.out.println("-------------------------");
        //调用多态打印信息
        CallPlan cp =new PayInfo();
        PayInfo pi = new PayInfo();
        cp.setMinutes(60);
        cp.setMonth_fee(10);
        cp.setMessage_num(100);
        cp.showCall();
        System.out.println("--------------------------------");
        //调用对象
        DataPlan dp = new DataPlan(90,20);
        pi.setTotal_data(dp);
        pi.setTotal_min(cp);
        pi.setTotal_fee(cp,dp);
        pi.getInfo();
    }
}
